<?php
/* @var $this StreetController */
/* @var $model Street */

$this->breadcrumbs=array(
	'街道'=>array('index'),
	'管理',
);

$this->menu=array(
	array('label'=>'List Street', 'url'=>array('index')),
	array('label'=>'Create Street', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#street-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<?php //echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'street-grid',
	'dataProvider'=>$model->search(),
	//'filter'=>$model,
	'columns'=>array(
		'id',
		'streetname',
		'sheng',
		'shi',
		'qu',
		'fzr',
		/*
		'lxdh',
		'bgdh',
		'dz',
		'bz',
		*/
        array(
			'class'=>'CLinkColumn',
            'label'=>'查看',
            //'url'=>Yii::app()->createURL('hzxx/edit',array('userid'=>$data->userID)),
             'urlExpression'=>'Yii::app()->createUrl("sq/admin",array("streetid"=>$data->id))',//显示URL
            'linkHtmlOptions'=>array('class'=>'tablelink')
            
		),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
